# -*- coding: utf-8 -*-

import time
import subprocess


time.sleep(120)

while True:
    print('Starting circle code...')
    process1 = subprocess.Popen(['D:\\python37\\python.exe', 'video_writer.py'])
    time.sleep(300)
    print('Stop circle code...')
    process1.terminate() # 5min后关闭程序
    print('Starting sleeping code...')
    process2 = subprocess.Popen(['D:\\python37\\python.exe', 'sleep_code.py'])
    time.sleep(300)
    process2.terminate() # 5min后关闭程序
    print('Stop sleeping code...')





